package com;

import java.util.ArrayList;

public class Test2 {
    public static void main(String[] args) {
        ArrayList<String>list=new ArrayList<>();
        list.add("abc");
        list.add("111");
        list.add("222");
        //1向集合末尾添加一个柳岩
        list.add("柳岩");
        //2將集合中111幹掉
        list.remove("111");
        //3讲一索引位置元素干掉
        list.remove(1);
        list.set(0,"yangmi");
        int size = list.size();
        System.out.println("size:"+size);
        String s = list.get(1);
        System.out.println("s:"+s);
        System.out.println("list="+list);

    }
}
